<!DOCTYPE html>
<html lang="en">

<head>
    <meta charset="UTF-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>响应式布局</title>
</head>

<body>
    <div class="main">
        <div class="list">
            <img src="https://www-static.chinacdn.starbucks.com.cn/prod/images/pages/tmall-2020-06-29-zh.jpg" alt="">
        </div>
        <div class="list">
            <img src="https://www-static.chinacdn.starbucks.com.cn/prod/images/pages/starbucks-design-studio-web-china.jpg"
                alt="">
        </div>
        <div class="list">
            <img src="https://www-static.chinacdn.starbucks.com.cn/prod/images/pages/homepage-career-cn.jpg" alt="">
        </div>
    </div>

</body>

<!-- 媒体查询可以查出设备的宽，可以把屏幕分成大屏中屏小屏
不同屏幕给html 元素设置不同的宽高，比方在大屏时 div 300px
中屏 200px  小屏 时设 100px -->
<style>
    body {
        margin: 0;
    }

    @media screen and (min-width:375px) {
        /* 小于750px显示为一个一行 */
        .list{
            width: 90%;
            height: 100px;
            text-align: center;
        }

        .list img {
            width: 50%;
            height: 100px;
        }
    }

    @media screen and (min-width:750px) {

        /* 大于750px显示为三个一行 */
        .list {
            float: left;
            width: 33.33%;
            height: 200px;
            text-align: center;
            vertical-align: middle;
            display: table-cell;
        }

        .list img {
            width: 50%;
            height: 150px;
        }
    }
</style>

</html>